#include "ParseData.h"

#include <QObject>
#include <QByteArray>
#include <QDebug>

ParseData::ParseData()
{

}

QString ParseData::parse(const QString &text)
{
    if (text.isEmpty()) {
    }

    QString result;

    QString tmp  = text;
    result  = QObject::tr("     GET: %1\n").arg(tmp.replace("\r\n", "\\r\\n"));
    result += QObject::tr("  TO HEX: %1\n").arg(QString(text.toUtf8().toHex().toUpper()));
    result += QObject::tr("FROM HEX: %1\n").arg(QString(QByteArray::fromHex(text.toUtf8())));

    return result + "\n";
}
